import 'package:huoxingwen/global.dart';
import 'package:huoxingwen/http/api.dart';
import 'package:huoxingwen/page/detail.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';

class IndexPage extends StatefulWidget {
  IndexPage({Key key, this.data}) : super(key: key);
  final data;

  @override
  _IndexPageState createState() => _IndexPageState();
}

class _IndexPageState extends State<IndexPage> {
  List resouItems = [];
  List resultItems = [];
  TextEditingController _searchController = new TextEditingController();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: <Widget>[
        SizedBox(height: Global.paddingTop + 50),
        Container(
          child: Image.asset('assets/images/1235.gif'),
        ),
        Container(
          height: 230,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              InkWell(
                child: Container(
                  width: 130,
                  height: 50,
                  padding: EdgeInsets.all(10),
                  decoration: BoxDecoration(
                    color: Global.primaryColor,
                    border: Border.all(
                      color: Global.primaryColor.withOpacity(.5),
                    ),
                    borderRadius: BorderRadius.circular(5),
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      Text(
                        "开始转换",
                        style: TextStyle(
                          fontSize: 20,
                          fontWeight: FontWeight.bold,
                        ),
                      ),
                      Icon(Icons.arrow_forward)
                    ],
                  ),
                ),
                onTap: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => DetailPage(),
                    ),
                  );
                },
              ),
            ],
          ),
        ),
        Container(
          child: Image.asset('assets/images/1168.gif'),
        ),
        SizedBox(height: 50),
      ],
    );
  }
}
